
package gui;


import javax.swing.JFrame;
import java.awt.Dimension;
import javax.swing.JPanel;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.GridBagLayout;
import javax.swing.JLabel;
import java.awt.Rectangle;

import javax.swing.ImageIcon;
import javax.swing.JComboBox;
import javax.swing.JButton;
import javax.swing.JTextField;
import javax.swing.JList;
import javax.swing.JOptionPane;
import javax.swing.JProgressBar;
import client.Client;
import javax.swing.JRadioButton;

public class CreditCardPaying  extends JPanel {
	
	
    static  public String[] years={" ","11","12","13","14","15"};
	static  public String[] month={"   ","01","02","03","04","05","06","07","08","09","10","11","12"};
	JButton jButtonExit = null;
	JButton jButtonBack = null;
	JButton jButtonnewcreditcard = null;
	private JLabel jLabelcreditnum = null;
	private JTextField jTextFieldcredirnumber = null;
	private JLabel jLabelexp = null;
	private JLabel jLabelyear = null;
	private JComboBox jComboBoxyera = null;
	private JLabel jLabelmonth = null;
	private JComboBox jComboBoxmonth = null;
	JButton jButtoncommit = null;
	public CreditCardPaying () {
		super();
		initialize();
	}
	
	
	private void initialize() {		
		jLabelmonth = new JLabel();
		jLabelmonth.setBounds(new Rectangle(380, 220, 79, 26));
		jLabelmonth.setText("Month:");
		jLabelyear = new JLabel();
		jLabelyear.setBounds(new Rectangle(190, 220, 79, 26));
		jLabelyear.setText("Year:");
		jLabelexp = new JLabel();
		jLabelexp.setBounds(new Rectangle(61, 220, 112, 26));
		jLabelexp.setText("EXPIRED DATE");
		jLabelcreditnum = new JLabel();
		jLabelcreditnum.setBounds(new Rectangle(61, 177, 171, 24));
		jLabelcreditnum.setText("credit card number:");
		this.setSize(600, 600);
		this.setLayout(null);
		this.setBackground(Color.cyan);
		this.add(getJButtonExit(), null);
		this.add(getJButtonBack(), null);
		this.add(getJButtonnewcreditcard(), null);
		this.add(jLabelcreditnum, null);
		this.add(getJTextFieldcredirnumber(), null);
		this.add(jLabelexp, null);
		this.add(jLabelyear, null);
		this.add(getJComboBoxyera(), null);
		this.add(jLabelmonth, null);
		this.add(getJComboBoxmonth(), null);
		this.add(getJButtoncommit(), null);
      
	}
	/**
	 * This method initializes jButtonExit	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonExit() {
		if (jButtonExit == null) {
			jButtonExit = new JButton();
			jButtonExit.setBounds(new Rectangle(420, 515, 91, 45));
			jButtonExit.setText("EXIT");

			jButtonExit.addActionListener(new java.awt.event.ActionListener() {
				public void actionPerformed(java.awt.event.ActionEvent e) {
					System.out.println("actionPerformed()"); // TODO Auto-generated Event stub actionPerformed()
				}
			});
		}
		return jButtonExit;
	}

	/**
	 * This method initializes jButtonBack	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonBack() {
		if (jButtonBack == null) {
			jButtonBack = new JButton();
			jButtonBack.setBounds(new Rectangle(80, 515, 91, 45));
			jButtonBack.setText("BACK");
			
		}
		return jButtonBack;
	}


	/**
	 * This method initializes jButtonnewcreditcard	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtonnewcreditcard() {
		if (jButtonnewcreditcard == null) {
			jButtonnewcreditcard = new JButton();
			jButtonnewcreditcard.setBounds(new Rectangle(173, 62, 253, 55));
			jButtonnewcreditcard.setText("ENTER NEW CREDIT CARD DETAILS");
		
		}
		return jButtonnewcreditcard;
	}


	/**
	 * This method initializes jTextFieldcredirnumber	
	 * 	
	 * @return javax.swing.JTextField	
	 */
	private JTextField getJTextFieldcredirnumber() {
		if (jTextFieldcredirnumber == null) {
			jTextFieldcredirnumber = new JTextField();
			jTextFieldcredirnumber.setBounds(new Rectangle(235, 177, 171, 24));
		}
		return jTextFieldcredirnumber;
	}


	/**
	 * This method initializes jComboBoxyera	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBoxyera() {
		if (jComboBoxyera == null) {
			jComboBoxyera = new JComboBox();
			jComboBoxyera.setBounds(new Rectangle(270, 220, 79, 26));
			int i= 0;
			while(i<6){
				jComboBoxyera.addItem(years[i]);
				i++;
				
			}
		}
		return jComboBoxyera;
	}


	/**
	 * This method initializes jComboBoxmonth	
	 * 	
	 * @return javax.swing.JComboBox	
	 */
	private JComboBox getJComboBoxmonth() {
		if (jComboBoxmonth == null) {
			jComboBoxmonth = new JComboBox();
			jComboBoxmonth.setBounds(new Rectangle(457, 220, 79, 26));
			int y= 0;
			while(y<13){
				jComboBoxmonth.addItem(month[y]);
				y++;
				
			}
		}
		return jComboBoxmonth;
	}


	/**
	 * This method initializes jButtoncommit	
	 * 	
	 * @return javax.swing.JButton	
	 */
	private JButton getJButtoncommit() {
		if (jButtoncommit == null) {
			jButtoncommit = new JButton();
			jButtoncommit.setBounds(new Rectangle(191, 304, 203, 65));
			jButtoncommit.setText("BUY");
			
		}
		return jButtoncommit;
	}
	
	}
  //  @jve:decl-index=0:visual-constraint="1,15"
